package com.example.demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by BG314005 on 2018/7/23.
 */
@RestController
public class TestOpenApiController {
    @Autowired
    private ApolloOpenApiHelper apolloOpenApiHelper;

    @RequestMapping("/getEnvClusters")
    public String getEnvCluters() {
        return apolloOpenApiHelper.getEnvCluters();
    }

    @RequestMapping("/getNamespaces")
    public String getNamespaces() {
        return apolloOpenApiHelper.getNamespaces();
    }

    @RequestMapping("/getNamespace/{namespace}")
    public String getNamespace(@PathVariable String namespace) {
        return apolloOpenApiHelper.getNamespace(namespace);
    }
}
